<?php 
//引进配置信息
include '../include/init.php';
//引入数据库配置信息
include '../include/mysql.config.php';
//引入公共函数
include '../include/common.fun.php';

// include '../include/page/page.php';
islogin();
include '../data/admin_data.php';
if($_POST){
	$idarr = isset($_POST['idarr'])?$_POST['idarr']:0;
	$ids = implode(',',$idarr);
	$where = "page_id IN ($ids)";
	$res = $db->delete('wd_page',$where);
	if($res){
		alert('删除成功','about_list.php');
	}else{
		alert('删除失败');
	}
}

$current=isset($_GET['page'])?$_GET['page']:1;

$sql='SELECT COUNT(page_id) as count from wd_page';
$page_list=$db->getOne($sql);
$count=$page_list['count'];

$limit=5;
$start=($current-1)*$limit;
$page = new Page($current,$count,$limit,5);
$page_link = $page->first()->prev()->num()->next()->show();

$sql="SELECT * from wd_page order by page_addtime desc limit $start,$limit";
$about=$db->getAll($sql);


include 'view/about_list.php';